package com.jzo2o.mall.system.model.dto;

import cn.hutool.core.bean.BeanUtil;
import com.jzo2o.mall.system.model.domain.AdminUser;
import com.jzo2o.mall.system.model.domain.Menu;
import com.jzo2o.mall.system.model.domain.Role;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 管理员VO
 */
@Data
public class AdminUserDTO extends AdminUser {

    private static final long serialVersionUID = -2378384199695839312L;
    
    @ApiModelProperty(value = "所属部门名称")
    private String departmentTitle;

    @ApiModelProperty(value = "用户拥有角色")
    private List<Role> roles;

    @ApiModelProperty(value = "用户拥有的权限")
    private List<Menu> menus;

    public AdminUserDTO(){

    }
    public AdminUserDTO(AdminUser user) {
        BeanUtil.copyProperties(user, this);
    }

}
